package com.lemon.braumgateway.config;

import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: SpringBootZoo
 * @author: Mr.Lemon
 * @create: 2020/6/16
 **/
@Configuration
public class RoutesConfig {


    @Bean
    public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
        return builder.routes().route("ashe", r -> r.path("/ashe/..").uri("lb://ashe")).build();
    }
}
